<?php

/**
 * page actions.
 *
 * @package    cpfaizenay
 * @subpackage page
 * @author     Manu
 * @version    1.0
 */
class pageActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request) {
      $slug = $request->getParameter('title_slug');
      $this->currentPage = Doctrine::getTable('Page')->getCurrentPage($slug)->fetchOne();
      $this->forward404Unless($this->currentPage);

      isicsBreadcrumbs::getInstance()->addItem($this->currentPage['title'], '#');

      $response = $this->getResponse();
      Utils::setSlogTitle($this->currentPage['title'], $response);
      $response->addMeta('description', Utils::slugDescription($this->currentPage['content']));
  }
}